<template>
    <div class="parent">
        <div class="child">
            <el-button type="danger" @click="changeValue">Change name in component A</el-button>
        </div>
    </div>
</template>

<script setup lang="ts">

const emit = defineEmits(['change'])
const changeValue = () => {
    emit('change', '我是子组件传递的值')
}
</script>